home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / demos / GL / libdemo / vect.h < prev   
C/C++ Source or Header  |  1994-08-01  |  2KB  |  63 lines

  1. /*
  2.  * Copyright 1991, 1992, 1993, 1994, Silicon Graphics, Inc.
  3.  * All Rights Reserved.
  4.  *
  5.  * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
  6.  * the contents of this file may not be disclosed to third parties, copied or
  7.  * duplicated in any form, in whole or in part, without the prior written
  8.  * permission of Silicon Graphics, Inc.
  9.  *
  10.  * RESTRICTED RIGHTS LEGEND:
  11.  * Use, duplication or disclosure by the Government is subject to restrictions
  12.  * as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
  13.  * and Computer Software clause at DFARS 252.227-7013, and/or in similar or
  14.  * successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
  15.  * rights reserved under the Copyright Laws of the United States.
  16.  */
  17. /*
  18.  * vect:
  19.  *    Functions to support operations on vectors and matrices.
  20.  *
  21.  * Original code from:
  22.  * David M. Ciemiewicz, Mark Grossman, Henry Moreton, and Paul Haeberli
  23.  *
  24.  * Much mucking with by:
  25.  * Gavin Bell
  26.  */
  27.  
  28. #ifndef VECTDEF
  29. #define VECTDEF
  30.  
  31. #include <math.h>
  32. #include <gl/gl.h>
  33.  
  34. float *vnew();
  35. float *vclone(const float *);
  36. void vcopy(const float *, float *);
  37. void vprint(const float *);
  38. void vset(float *, float, float, float);
  39. void vzero(float *);
  40. void vnormal(float *);
  41. float vlength(const float *);
  42. void vscale(float *, float);
  43. void vmult(const float *, const float *, float *);
  44. void vadd(const float *, const float *, float *);
  45. void vsub(const float *, const float *, float *);
  46. void vhalf(const float *, const float *, float *);
  47. float vdot(const float *, const float *);
  48. void vcross(const float *, const float *, float *);
  49. void vdirection(const float *, float *);
  50. void vreflect(const float *, const float *, float *);
  51. void vmultmatrix(const Matrix, const Matrix, Matrix);
  52. void vtransform(const float *, const Matrix, float *);
  53. void vtransform4(const float *, const Matrix, float *);
  54.  
  55. extern Matrix idmatrix;
  56.  
  57. void mcopy(const Matrix, Matrix);
  58. void minvert(const Matrix, Matrix);
  59. void vgetmatrix(Matrix m);
  60. void linsolve(const float *[], int, float *);
  61.  
  62. #endif /* VECTDEF */
  63.